﻿<Window x:Class="Asistente.SingleEntitySelection"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:raiz="clr-namespace:Asistente"
        Title="Single Entity Selection" WindowStartupLocation="CenterScreen" Height="300" Width="300" Icon="/Asistente;component/Images/wizard.jpg">
    
    <Window.Resources>
        
        <ObjectDataProvider x:Key="viewModel" 
          ObjectType="{x:Type raiz:SingleEntitySelectionViewModel}">
        </ObjectDataProvider>
        
        <!-- Entity Layout RadioButton-->
        <DataTemplate x:Key="entityLayoutRadioButton" DataType="Entity">
            <RadioButton GroupName="Entities" Content="{Binding Path=Name}" IsChecked="{Binding Path=IsChecked}" />
        </DataTemplate>
        
    </Window.Resources>
    
    <Grid>
        <Grid.DataContext>
            <Binding Source="{StaticResource viewModel}"/>
        </Grid.DataContext>
        <ListBox Name="EditedEntities" ItemsSource="{Binding Path=Entities}" Margin="12,12,12,56"  ItemTemplate="{DynamicResource entityLayoutRadioButton}" />
        <Button Content="OK" Height="23" HorizontalAlignment="Right" IsDefault="True" Margin="0,0,93,12" Name="buttonOk" VerticalAlignment="Bottom" Width="75" Click="ButtonOkClick" />
        <Button Content="Cancel" Height="23" HorizontalAlignment="Right" IsCancel="True" Margin="0,0,12,12" Name="buttonCancel" VerticalAlignment="Bottom" Width="75" Click="ButtonCancelClick" />
    </Grid>
    
</Window>
